///判断是否debug环境
bool get isInDebugMode {
  bool inDebugMode = false;
  assert(inDebugMode = true); //如果debug模式下会触发赋值
  return inDebugMode;
}

///截取超过长度的字符串
String truncateString(String value, int maxLength) {
  if (value.length <= maxLength) {
    return value;
  } else {
    return value.substring(0, maxLength);
  }
}

///判断是否生产环境
const bool inProduction = bool.fromEnvironment("dart.vm.product");
